<template>
	<a-button class="editable-add-btn" type="primary" style="margin-bottom: 8px;float: right;"
		@click="handleAdd">Add</a-button>
	<a-table :dataSource="dataSource" :columns="columns" />
</template>
<script setup>
	import {
		ref
	} from 'vue'
	const columns = ref([{
			title: '设备名称',
			dataIndex: 'deviceName',
			key: 'deviceName',
		},
		{
			title: '设备编码',
			dataIndex: 'deviceNumber',
			key: 'deviceNumber',
		},
		{
			title: '所属产品',
			dataIndex: 'belongProducts',
			key: 'belongProducts',
		},
		{
			title: '设备定位',
			dataIndex: 'address',
			key: 'address',
		},
		{
			title: '数据模板',
			dataIndex: 'template',
			key: 'template',
		},
		{
			title: '信号',
			dataIndex: 'signal',
			key: 'signal',
		},
		{
			title: '状态',
			dataIndex: 'state',
			key: 'state',
		},
		{
			title: '创建时间',
			dataIndex: 'createTime',
			key: 'createTime',
		},
		{
			title: '激活时间',
			dataIndex: 'activeTime',
			key: 'activeTime',
		},
	])
	const dataSource = ref([{
		key: '1',
		deviceName: '测试设备1',
		deviceNumber: 'SC110101013209',
		belongProducts: '半导体',
		address: '西安市未央区龙腾半导体',
		template: 'EXCOOL',
		createTime: '2024/05/10',
		activeTime: '2024/05/14',
		state: '在线',
		signal: '正常'
	},
	{
		key: '1',
		deviceName: '测试设备2',
		deviceNumber: 'SC110101013210',
		belongProducts: 'ICT机房',
		address: '西安市未央区龙腾半导体',
		template: 'EXCOOL',
		createTime: '2024/04/10',
		activeTime: '2024/06/14',
		state: '在线',
		signal: '正常'
	}])
</script>